import request from '@/utils/request'

// 查询耗材包列表
export function listPackages(query) {
  return request({
    url: '/service/packages/list',
    method: 'get',
    params: query
  })
}

export function listPackagesNew(query) {
  return request({
    url: '/service/packages/listNew',
    method: 'get',
    params: query
  })
}

// 查询耗材包详细
export function getPackages(packagesId) {
  return request({
    url: '/service/packages/' + packagesId,
    method: 'get'
  })
}
// 查询耗材包详细New
export function getPackagesNew(packagesId) {
  return request({
    url: '/service/packages/new/' + packagesId,
    method: 'get'
  })
}

// 新增耗材包
export function addPackages(data) {
  return request({
    url: '/service/packages',
    method: 'post',
    data: data
  })
}

// 修改耗材包
export function updatePackages(data) {
  return request({
    url: '/service/packages',
    method: 'put',
    data: data
  })
}

// 删除耗材包
export function delPackages(packagesId) {
  return request({
    url: '/service/packages/' + packagesId,
    method: 'delete'
  })
}

// 保存耗材包详情
export function savePackages(data) {
  return request({
    url: '/service/packages/savePackages',
    method: 'post',
    data: data
  })
}

// 查询耗材包列表
export function getSupplies() {
  return request({
    url: '/service/packages/getSupplies',
    method: 'get'
  })
}
